/*
https://www.luogu.com.cn/problem/B3625
BFS 代码实现首先，建立一个队列，保存「待访问的点」。
•把起始点(1,1)入队
•当队列非空时，重复以下操作：
-弹出队首元素𝑥,𝑦；
-若(𝑥,𝑦)是墙，或者已经被访问过，则忽略；
-将与(𝑥,𝑦)相邻的点（上下左右）入队
*/
#include <bits/stdc++.h>
using namespace std;

int n, m, isOk;
char a[105][105];
bool vis[105][105];

struct Pos {
    int x, y;
    Pos(int ax, int ay) {
        x = ax, y = ay;
    }
};

void bfs() {
    queue<Pos> q;

    q.push(Pos(1, 1));

    while(!q.empty()) {
        Pos now = q.front();
        q.pop();

        int x = now.x, y = now.y;

        if(x < 1 || x > n) continue;
        if(y < 1 || y > m) continue;
        if(a[x][y] == '#') continue;

        if(vis[x][y]) continue;
        vis[x][y] = 1;


        if(x == n && y == m) isOk = true;

        q.push(Pos(x + 1, y));
        q.push(Pos(x - 1, y));
        q.push(Pos(x, y + 1));
        q.push(Pos(x, y - 1));
    }

}

int main() {
    cin >> n >> m;
    for(int i = 1; i <= n; i++)
        cin >> a[i] + 1;

    bfs();

    if(isOk)
        cout << "Yes" << endl;
    else
        cout << "No" << endl;

    return 0;
}
/*
g++ bfs/bfs_1.cpp && echo "3 5
.##.#
.#...
...#." | ./a.out
*/